class TeamSpacesVo {
	TeamSpacesData? data;

	TeamSpacesVo({this.data});

	TeamSpacesVo.fromJson(Map<String, dynamic> json) {
		data = json['data'] != null ? new TeamSpacesData.fromJson(json['data']) : null;
	}

	// Map<String, dynamic> toJson() {
	// 	final Map<String, dynamic> data = new Map<String, dynamic>();
	// 	if (this.data != null) {
  //     data['data'] = this.data!.toJson();
  //   }
	// 	return data;
	// }
}

class TeamSpacesData {
	String? title;
	TeamData? item;
	StatisticsItem? statistics;
	ListDataItem? seckill;
	ListDataItem? team;

	TeamSpacesData({this.title, this.item, this.statistics, this.seckill, this.team});

	TeamSpacesData.fromJson(Map<String, dynamic> json) {
		title = json['title'];
		item = json['item'] != null ? new TeamData.fromJson(json['item']) : null;
		statistics = json['statistics'] != null ? new StatisticsItem.fromJson(json['statistics']) : null;
		seckill = json['seckill'] != null ? new ListDataItem.fromJson(json['seckill']) : null;
    if (json['team'] is List) {
      // team = ListDataItem(
      //   title: '',
      //   item: []
      // );
      team = null;
    } else {
      team = json['team'] != null ? new ListDataItem.fromJson(json['team']) : null;
    }
	}

	// Map<String, dynamic> toJson() {
	// 	final Map<String, dynamic> data = new Map<String, dynamic>();
	// 	data['title'] = this.title;
	// 	if (this.item != null) {
  //     data['item'] = this.item!.toJson();
  //   }
	// 	if (this.statistics != null) {
  //     data['statistics'] = this.statistics!.toJson();
  //   }
	// 	if (this.seckill != null) {
  //     data['seckill'] = this.seckill!.toJson();
  //   }
	// 	if (this.team != null) {
  //     data['team'] = this.team!.toJson();
  //   }
	// 	return data;
	// }
}

class TeamData {
	String? name;
	String? createdAt;

	TeamData({this.name, this.createdAt});

	TeamData.fromJson(Map<String, dynamic> json) {
		name = json['name'];
		createdAt = json['created_at'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['name'] = this.name;
		data['created_at'] = this.createdAt;
		return data;
	}
}

class StatisticsItem {
	String? title;
	List<List<DataItem>>? item;

	StatisticsItem({this.title, this.item});

	StatisticsItem.fromJson(Map<String, dynamic> json) {
		title = json['title'];
		if (json['item'] != null) {
			item = [];
			json['item'].forEach((v) { 
        var dataItemArr = <DataItem>[];
        v.forEach((vItem) {
          dataItemArr.add(new DataItem.fromJson(vItem));
        });
        item!.add(dataItemArr); 
      });
		}
	}

	// Map<String, dynamic> toJson() {
	// 	final Map<String, dynamic> data = new Map<String, dynamic>();
	// 	data['title'] = this.title;
	// 	if (this.item != null) {
  //     data['item'] = this.item!.map((v) => v.toJson()).toList();
  //   }
	// 	return data;
	// }
}

class ListDataItem {
	String? title;
	List<DataItem>? item;

	ListDataItem({this.title, this.item});

	ListDataItem.fromJson(Map<String, dynamic> json) {
		title = json['title'];
		if (json['item'] != null) {
			item = [];
			json['item'].forEach((v) { item!.add(new DataItem.fromJson(v)); });
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['title'] = this.title;
		if (this.item != null) {
      data['item'] = this.item!.map((v) => v.toJson()).toList();
    }
		return data;
	}
}

class DataItem {
	String? label;
	String? value;

	DataItem({this.label, this.value});

	DataItem.fromJson(Map<String, dynamic> json) {
		label = json['label'].toString();
		value = json['value'].toString();
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['label'] = this.label;
		data['value'] = this.value;
		return data;
	}
}

